// A simple demo for the array class for numbers.
// By DreamVB 00:50 04/11/2016

#include <iostream>
#include <string>
#include "Array.h"

using namespace std;
using std::cout;
using std::endl;

int main(int argc, char *argv[]){
	const double size = 12;
	int t = 0;
	int table = 2;
	TMyArray<int> values(size);

	cout << "Enter a times table number eg [1..12] : ";
	cin >> table;

	//Calc the times table into our array.
	for (int i = 0; i <= values.Length()-1; i++){
		t++;
		values[i] = (table * t);
	}

	//Now display the times table
	t = 0;
	for (int i = 0; i <= values.Length() - 1; i++){
		t++;
		if (i < 9){
			cout << t << "  * " << table << " = " << values[i] << endl;
		}
		else{
			cout << t << " * " << table << " = " << values[i] << endl;
		}
	}

	system("pause");
	return 0;
}